package com.luo.controller;



import com.luo.pojo.Results;
import com.luo.service.IClassService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 班级信息表 前端控制器
 * </p>
 *
 * @author luo
 * @since 2025-06-22
 */
@RestController
@RequestMapping("/class")
@CrossOrigin("*")
public class ClassController {

    private final IClassService classService;

    @Autowired
    public ClassController(IClassService classService) {
        this.classService = classService;
    }


    @ApiOperation("获取班级数量")
    @GetMapping("ClassSelectCount")
    public Results ClassSelectCount() {
        return Results.success(classService.count());
    }




}
